﻿@{
    ViewBag.Title = "生产日报";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section scripts{
        <script src="~/Areas/Pacm/ViewModels/Pacm.com.js"></script>
        <script src="~/Areas/Pacm/ViewModels/Pacm.viewModel.search.js"></script>
        <script type="text/javascript">
            var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
            var viewModel = function(){ 
                Pacm.viewModel.search.apply(this,arguments);
            };
            ko.bindingViewModel(new viewModel(data));
            function cellStyler1(value,row,index){
                return 'background-color:#D7FFEE;color:blue;';
            }
            function cellStyler2(value,row,index){
                return 'background-color:#FAF4FF;color:blue;';
            }
            function cellStyler3(value,row,index){
                return 'background-color:#F0FFF0;color:blue;';
            }
        </script>
}
        <div class="z-toolbar">
            <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh" title="刷新" data-bind="click:refreshClick">刷新</a>
            @*<a id="a_add"    href="#" plain="true" class="easyui-linkbutton" icon="icon-add" title="新增" data-bind="click:addClick">新增</a>
            <a id="a_edit"   href="#" plain="true" class="easyui-linkbutton" icon="icon-edit" data-bind="click:editClick" title="编辑">编辑</a>
            <a id="a_del"    href="#" plain="true" class="easyui-linkbutton" icon="icon-cross" title="删除" data-bind="click:deleteClick">删除</a>
            <a id="a_audit"  href="#" plain="true" class="easyui-linkbutton" icon="icon-folder_key" data-bind="click:auditClick" title="审核">审核</a>*@
            <a id="a_export" href="#" class="easyui-splitbutton" data-options="menu:'#dropdown',iconCls:'icon-download'">导出</a>
        </div>

        <div id="dropdown" style="width:100px; display:none;">  
            <div data-options="iconCls:'icon-ext-xls'"      suffix="xls"    data-bind="click:downloadClick">Excel2003   </div>  
            <div data-options="iconCls:'icon-page_excel'"   suffix="xlsx"   data-bind="click:downloadClick">Excel2007   </div>  
            <div data-options="iconCls:'icon-ext-doc'"      suffix="doc"    data-bind="click:downloadClick">Word2003    </div>  
        </div> 

        <div id="condition" class="container_12" style="position:relative;height:50px;">
         <div class="clear" style="height:13px;"></div>
            <div class="grid_1 lbl">工区编号</div>
            <div class="grid_2 val"><input type="text" data-bind="datasource:dataSource.gqzdItems ,comboboxValue:form.Gqzd_Gqbh" class="z-txt easyui-combobox" data-options="showblank:true"/></div>
            <div class="grid_1 lbl">电解槽号</div>
            <div class="grid_2 val"><input type="text" data-bind="numberspinnerValue:form.Scsj_Ch"  class="z-txt easyui-numberspinner" data-options="min:1001,max:2168,increment:1"/></div>
           
            <div class="grid_1 lbl">查询日期</div>
            <div class="grid_2 val"><input type="text" data-bind="value:form.Scsj_Rq" class="z-txt easyui-daterange"/></div>
            <div class="clear"></div>
            <div class="prefix_9" style="position:absolute;top:5px;height:0;">  
                <a id="a_search" href="#" class="button button-blue" style="margin:0 15px;" data-bind="click:searchClick">查询</a> 
                <a id="a_reset" href="#" class="button button-blue" data-bind="click:clearClick">清空</a>
            </div>
        </div>

        <table id="gridlist" data-bind="datagrid:grid">
              <thead data-options="frozen:true">
                    <tr>
                        <th field="Scsj_Rq"  rowspan="2" sortable="false" align="center" formatter="com.formatDate"     width="70">日期</th>  
                        <th field="Scsj_Ch"  rowspan="2" sortable="false" align="center"    width="60">槽号</th>  
                    </tr>
              </thead>
              <thead>
                    <tr>
                        <th field="Scsj_Cl"  rowspan="2" sortable="false" align="center"    width="60">槽龄</th>  
                        <th colspan="3">槽电压信息(v)</th>
                        <th colspan="10">效应信息</th>
                        <th colspan="9">加料信息</th>
                        <th colspan="14">测量数据</th>
                    </tr>
                   <tr>
                        @*槽电压信息*@
                        <th field="Scsj_Cy_Sddy"   rowspan="1"   sortable="false" align="center" styler="cellStyler1"  width="60">设定电压</th>
                        <th field="Scsj_Cy_Gzdy"   rowspan="1"   sortable="false" align="center" styler="cellStyler1"  width="60">工作电压</th>  
                        <th field="Scsj_Cy_Pjdy"   rowspan="1"   sortable="false" align="center" styler="cellStyler1"  width="60">平均电压</th>
                        @*效应信息*@
                        <th field="Scsj_Xy_Cs"     rowspan="1"   sortable="false" align="center"   width="60">AE次数</th>
                        <th field="Scsj_Xy_Cxsj"   rowspan="1"   sortable="false" align="center"   width="60">AE持续时间（s）</th>  
                        <th field="Scsj_Xy_Fy"     rowspan="1"   sortable="false" align="center"   width="80">AE峰压（v）</th>
                        <th field="Scsj_Xy_Jy"     rowspan="1"   sortable="false" align="center"   width="80">AE均压（v）</th>
                        <th field="Scsj_Xy_Gh"     rowspan="1"   sortable="false" align="center"   width="80">AE功耗（Khw）</th>  
                        <th field="Scsj_Xy_Sscs"   rowspan="1"   sortable="false" align="center"   width="80">闪烁AE次数</th>
                        <th field="Scsj_Xy_Sscxsj" rowspan="1"   sortable="false" align="center"   width="80">闪烁AE持续时间(s)</th>
                        <th field="Scsj_Xy_Ssfy"   rowspan="1"   sortable="false" align="center"   width="80">闪烁AE峰压(v)</th>  
                        <th field="Scsj_Xy_Ssjy"   rowspan="1"   sortable="false" align="center"   width="80">闪烁AE均压(v)</th>
                        <th field="Scsj_Xy_Ssgh"   rowspan="1"   sortable="false" align="center"   width="80">闪烁AE功耗(Khw)</th>
                        @*加料信息*@
                        <th field="Scsj_Jl_Zcjl"   rowspan="1"   sortable="false" align="center"   width="80">正常加料(Kg)</th>
                        <th field="Scsj_Jl_Zljl"   rowspan="1"   sortable="false" align="center"   width="80">增量加料(Kg)</th>  
                        <th field="Scsj_Jl_Jljl"   rowspan="1"   sortable="false" align="center"   width="80">减量加料(Kg)</th>
                        <th field="Scsj_Jl_Rgjl"   rowspan="1"   sortable="false" align="center"   width="80">人工加料(Kg)</th>
                        <th field="Scsj_Jl_Zakjl"  rowspan="1"   sortable="false" align="center"   width="80">总AK加料(Kg)</th>
                        <th field="Scsj_Jl_Rgakjl" rowspan="1"   sortable="false" align="center"   width="80">人工AK加料(Kg)</th>  
                        <th field="Scsj_Jl_Zjll"   rowspan="1"   sortable="false" align="center" styler="cellStyler2"  width="80">总加料量(Kg)</th>
                        <th field="Scsj_Jl_Zfyl"   rowspan="1"   sortable="false" align="center" styler="cellStyler2"  width="80">总氟盐量(Kg)</th>  
                        <th field="Scsj_Jl_Nbjg"   rowspan="1"   sortable="false" align="center"   width="80">NB间隔(s)</th>
                        @*测量数据*@
                        <th field="Scsj_Cl_Rccs"   rowspan="1"   sortable="false" align="center"   width="60">RC次数</th>
                        <th field="Scsj_Cl_Ycdysj" rowspan="1"   sortable="false" align="center"   width="80">异常电压时间(mm)</th>  
                        <th field="Scsj_Cl_Sdcs"   rowspan="1"   sortable="false" align="center"   width="60">手动次数</th>
                        <th field="Scsj_Cl_Zs"     rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="80">噪声(nΩ)</th>
                        <th field="Scsj_Clh_Fe"    rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="80">Fe含量</th>  
                        <th field="Scsj_Clh_Si"    rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="80">Si含量</th>
                        <th field="Scsj_Clh_Ylzl"  rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="80">原铝质量</th>
                        <th field="Scsj_Clh_Yhlnd" rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="80">氧化铝浓度(%)</th>  
                        <th field="Scsj_Clh_Fzb"   rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="60">分子比</th>
                        <th field="Scsj_Clh_Cll"   rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="60">出铝量(Kg)</th>
                        <th field="Scsj_Clh_Zsp"   rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="80">质水平(Cm)</th>
                        <th field="Scsj_Clh_Lsp"   rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="80">铝水平(Cm)</th>
                        <th field="Scsj_Clh_Cwd"   rowspan="1"   sortable="false" align="center"  styler="cellStyler3" width="80">槽温度(°C)</th>
                        <th field="Scsj_Ch"        rowspan="1"   sortable="false" align="center"   width="60">槽号</th>
                   </tr>
                </thead>    
        </table> 
